cc.Class({
    extends: cc.Component,

    properties: {
        // foo: {
        //    default: null,      // The default value will be used only when the component attaching
        //                           to a node for the first time
        //    url: cc.Texture2D,  // optional, default is typeof default
        //    serializable: true, // optional, default is true
        //    visible: true,      // optional, default is true
        //    displayName: 'Foo', // optional
        //    readonly: false,    // optional, default is false
        // },
        // ...
        _txtInfo:null,
    },

    // use this for initialization
    onLoad: function () {
        this._txtInfo = cc.find("Canvas/page_wdxx/info").getComponent(cc.Label);
        this.node.on("switch_page",function(data){
           var pageName = data.detail;
           if(pageName == "wdxx"){
               this._txtInfo.string = "";
               this._txtInfo.string += "手机号码:" + cc.userdata.phonenumber + "\n";
               this._txtInfo.string += "用户昵称:" + cc.userdata.name + "\n";
               this._txtInfo.string += "游戏ID:" + cc.userdata.gameid + "\n";
               this._txtInfo.string += "剩余房卡:" + cc.userdata.gems + "\n";
           }
        }.bind(this));
    },

    // called every frame, uncomment this function to activate update callback
    // update: function (dt) {

    // },
});
